package com.pubinfo.passbook.common.model.bo.witeoff.subitem;

import io.swagger.annotations.ApiModel;
import lombok.Data;

import java.math.BigDecimal;

@Data
@ApiModel(value = "EnvironmentalOrGroupMembershipDuesSubitem", description = " (环保费|社会团体费)子单报账,接收前端报账单数据")
public class EnvironmentalOrGroupMembershipDuesSubitem extends SubitemBase {
  public EnvironmentalOrGroupMembershipDuesSubitem(BigDecimal sum, Integer type, String sapCompayCode) {
    //如果type为0 则为环保费,为1,则为社会团体费
    if (type == 0) {
      //U219 或U220
      this.usageCode = "U219";
      this.usageName = "垃圾处理";
  
    } else if (type == 1) {
      //生产 U541 测试环境 U165
      this.usageCode = "U165";
      this.usageName = "团体会费";
    }
    this.budgetType = "上市".equals(sapCompayCode) ? 1 : 2;
    //budgetType    desc
    this.sum = sum;
  
    this.priceSum = sum;
    this.budgetItemCode = "CW1145";
    this.budgetItemName = "其他";
    //budgetOrgCode budgetOrgName sapCostCenterCode sapCostCenterName profitsCenterCode profitsCenterName
  }
}
